<template>
  <tr>
        <td>合计：</td>
        <td colspan="5">{{sum}}</td>
       </tr>
</template>

<script>
export default {
props:['goodListArr'],
computed:{
  arr(){
    return this.goodListArr.map(item=>{
      if(item.checked==true){
        return item.num*item.price
      }else{
        return 0
      }
    })
  },
  sum(){
    return this.arr.reduce((prev,item)=>prev+item,0)
  }
}
}
</script>

<style>

</style>